<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title> OpenID 登录最后一步 - LooPo-乐铺 </title>
<?php include VIEWS.'header.html'?>
</head>

<body>
<?php include VIEWS.'validation.html'?>
<?php include VIEWS.'topbar.html'?>

<div id="content">

    <?php include VIEWS.'leftnav.html'?>

    <div id="right">

    <h1>OpenID 登录最后一步</h1>

<?php if ($code['register'] & 1):?>
<?php
//autologin
$expire = time() + 60; //One min
setcookie('username', $data['username'], $expire);
setcookie('password', md5($data['password']), $expire);
setcookie('autologin', 1, $expire);
?>
<meta http-equiv="refresh" content="10;url=<?php echo $this->request['from'] ? $this->request['from'] : '/'?>">
<div class="goodbox roundNormal">&nbsp;&nbsp;&nbsp;恭喜您已经成为了乐铺的会员!<a href="<?php echo $this->request['from'] ? $this->request['from'] : '/'?>">接下来您将以会员身份访问乐铺！</a></div><br clear="all">

<iframe src="http://groups.google.com/group/loopo/boxsubscribe?email=<?php echo urlencode($data['email'])?>&amp;hl=zh-CN" width="1" height="1" style="display:none"></iframe>
<iframe src="/shell/_newuser.php" width="1" height="1" style="display:none"></iframe>

<div style="text-align:right; margin-top:20px;">
</div>

<?php else:?>

<?php if ($code['register'] & 4):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;注册过程中发生错误，请稍候再试</div><br clear="all"><?php endif;?>
<?php if ($code['register']):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;请修正下列错误信息</div><br clear="all"><?php endif;?>

<form method="post" id="regform" name="regform" action="/imnew.php">
<table border="0" cellpadding="5">
<tr>
<td>确认您的 OpenID：</td>
<td nowrap="nowrap"><img src="/images/openid/openid.gif" align="absmiddle" alt="OpenID" /><?php echo $session['openid']?></td>
</tr>
<tr><td style="padding-right:1em" nowrap="nowrap">请补充您的 Email：</td><td><div class="errorbox-<?php echo ($code['register'] & 64 || $code['register'] & 256) ? 'bad' : 'good'?>"><input title="请输入正确的 email 地址" autocomplete="off" class="input2 required validate-email" id="email" type="text" name="email" value="<?php echo $data['email']?>" size="26" /><div class="errormsg"><?php if ($code['register'] & 256) echo 'Email地址已存在, <a href="/forgotpwd">忘了密码吗</a> ?'?><?php if ($code['register'] & 64) echo 'Email地址不合法'?></div></div></td></tr>
<tr><td colspan="3"><br /><input type="hidden" name="camefrom" value="<?php echo intval($cookie['camefrom'])?>" /><input class="bluebtn" type="submit" value="完成 OpenID 登录" name="Submit" style="font-weight:bold;" tabindex="1" /></td></tr>
</table>
</form>

<br clear="all" />

<script type="text/javascript">
<!--
new Validation('regform',{useTitles:true,stopOnFirst:true});
if ($F('email') == "") $('email').focus();
//-->
</script>

<?php endif;?>

    </div>
</div>

<?php include VIEWS.'copyright.html'?>

</body>
</html>
